import request from '@/utils/request'
// 引入qs库，qs.stringify()可以将对象转成字符串形式，这是因为后台接口的要求，一般来说axios传入data对象即可
import qs from 'qs'

export function cameraInfo () {
  let data = {
    "cameraFps": 0,
    "cameraHeight": 0,
    "cameraLatitude": 0,
    "cameraLongitude": 0,
    "cameraName": "string",
    "cameraType": "string",
    "cameraWidth": 0,
    "deviceId": 0,
    "deviceLatitude": 0,
    "deviceLongitude": 0,
    "deviceName": "string",
    "number": "string"
  }
//   data = qs.stringify(data)
  return request({
    url: '/camera/saveInfo',
    method: 'get',
    data
  })
}

export function getCameraFromDevice(){
    return request({
        url: '/camera/getCameraFromDevice',
        method: 'post',
    })
}

export function cameraSwitch(){
    return request({
        url: '/camera/switch',
        method: 'get',
    })
}